package com.badibadi.logic;

import java.util.ArrayList;

import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.R.id;
import com.badibadi.uniclubber.R.layout;
import com.badibadi.uniclubber.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class PiLiangUpPictureModelActivity extends Activity {

	ListView listView;
	ArrayList<String> listfile = new ArrayList<String>();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_pi_liang_up_picture);
		this.findViewById(R.id.go).setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent in=new Intent(PiLiangUpPictureModelActivity.this,ImgFileListActivity.class);
				startActivity(in);
				
			}
		});

		listView = (ListView) findViewById(R.id.listView1);
		Bundle bundle = getIntent().getExtras();

		if (bundle != null) {
			if (bundle.getStringArrayList("files") != null) {
				listfile = bundle.getStringArrayList("files");
				listView.setVisibility(View.VISIBLE);
				ArrayAdapter<String> arryAdapter = new ArrayAdapter<String>(
						this, android.R.layout.simple_list_item_1, listfile);
				listView.setAdapter(arryAdapter);
			}
		}

	}

	public void chise(View v) {
		Intent intent = new Intent();
		intent.setClass(this, ImgFileListActivity.class);
		startActivity(intent);
	}

}
